import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
export default new Router({
  mode: 'history',
  routes: [{
    path: '/',
    name: 'Homepage',
    component: resolve => require(['@/pages/Homepage/Homepage.vue'], resolve)
  }, {
    path: '/seller',
    name: 'Seller',
    component: resolve => require(['@/pages/seller/mainPage/MainPage.vue'], resolve),
  }, {
    redirect: '/seller/personal_center/personal_info',
    path: '/seller/personal_center',
    name: 'PersonalCenter',
    component: resolve => require(['@/pages/seller/personalCenter/PersonalCenter.vue'], resolve),
    children: [{
      path: '/seller/personal_center/account_management',
      name: 'AccountManagement',
      component: resolve => require(['@/pages/seller/personalCenter/accountManagement/AccountManagement.vue'], resolve),
      meta: {hideFooter: true}
    }, {
      path: '/seller/personal_center/product',
      name: 'Product',
      component: resolve => require(['@/pages/seller/personalCenter/product/Product.vue'], resolve),
      meta: {hideFooter: true}
    }, {
      path: '/seller/personal_center/my_collection',
      name: 'MyCollection',
      component: resolve => require(['@/pages/seller/personalCenter/myCollection/MyCollection.vue'], resolve),
      meta: {hideFooter: true}
    }, {
      path: '/seller/personal_center/message_center',
      name: 'MessageCenter',
      component: resolve => require(['@/pages/seller/personalCenter/messageCenter/MessageCenter.vue'], resolve),
      meta: {hideFooter: true}
    }, {
      path: '/seller/personal_center/my_purchase',
      name: 'MyPurchase',
      component: resolve => require(['@/pages/seller/personalCenter/myPurchase/MyPurchase.vue'], resolve),
      meta: {hideFooter: true}
    }]
  }, {
    path: '/buyer',
    name: 'Buyer',
    component: resolve => require(['@/pages/buyer/Buyer.vue'], resolve)
  }]
})
